/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Javabeans;

import csvloader.CSVLoader;
import java.util.HashMap;

/**
 * @author Muhammed
 * 
 */
public class Attribute implements Cloneable{
    private String name;
    private String type;
    private double weight=1.0;
    private double max;
    private double min;
    private HashMap<String, Double> similarityMatrix;
    private boolean isOuput;

    public static final String NUMERIC = "Numeric";
    public static final String NOMINAL = "Nominal";

    public Attribute(String name){
        this.name=name;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the type
     */
    public String getType() {
        return type;
    }

    /**
     * @param type the type to set
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * @return the weight
     */
    public double getWeight() {
        return weight;
    }

    /**
     * @param weight the weight to set
     */
    public void setWeight(double weight) {
        this.weight = weight;
    }

    /**
     * @return the similarityMatrix
     */
    public HashMap<String, Double> getSimilarityMatrix() {
        return similarityMatrix;
    }

    /**
     * @param similarityMatrix the similarityMatrix to set
     */
    public void setSimilarityMatrix(HashMap<String, Double> similarityMatrix) {
        this.similarityMatrix = similarityMatrix;
    }

    /**
     * @return the isOuput
     */
    public boolean isIsOuput() {
        return isOuput;
    }

    /**
     * @param isOuput the isOuput to set
     */
    public void setIsOuput(boolean isOuput) {
        this.isOuput = isOuput;
    }

    /**
     * @return the max
     */
    public double getMax() {
        return max;
    }

    /**
     * @param max the max to set
     */
    public void setMax(double max) {
        this.max = max;
    }

    /**
     * @return the min
     */
    public double getMin() {
        return min;
    }

    /**
     * @param min the min to set
     */
    public void setMin(double min) {
        this.min = min;
    }
    public Object clone(){
        try{
          Attribute cloned = (Attribute)super.clone();
          return cloned;
        }
        catch(CloneNotSupportedException e){
          System.out.println(e);
          return null;
        }
    }
    public void addToWeight(double increment){
        this.weight+=increment;
    }
}
